#include "cwhttpreply.h"

CWHttpReply::CWHttpReply(const std::string &version, const unsigned short status_code, const std::string &description)
{
    m_strreply += version + ' ' + std::to_string(status_code) + ' ' + description + "\r\n";
}

void CWHttpReply::setReplyHeader(const char *key, const char *val)
{
    m_strreply += std::string(key) + ": " + val + "\r\n";
}

void CWHttpReply::setReplyData(const std::string &data)
{
    m_strreply += "\r\n" + data;
}